<script setup lang="ts">
defineOptions({
  name: "flexdemo"
});
</script>

<template>
  <div class="main">
    <div class="box">
      <div class="fan">
        <div class="top-fan" />
        <div class="right-fan" />
        <div class="bottom-fan" />
        <div class="left-fan" />
        <div class="fastened" />
      </div>
      <div class="stick" />
    </div>
  </div>
</template>

<style scoped lang="scss">
.main {
  height: 80vh;
  background-color: pink;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 0;
}

.box {
  position: relative;
  width: 200px;
  height: 400px;
  z-index: 1;
}

.fan {
  position: relative;
  widows: 200px;
  height: 200px;
  animation: rotate 3s linear infinite;
}

.fan:hover {
  animation: rotate 2s linear infinite;
}

.top-fan {
  position: absolute;
  top: 0;
  left: 0;
  border-top: 50px solid red;
  border-right: 50px solid red;
  border-bottom: 50px solid orange;
  border-left: 50px solid transparent;
}

.right-fan {
  position: absolute;
  top: 0;
  right: 0;
  border-top: 50px solid transparent;
  border-right: 50px solid yellow;
  border-bottom: 50px solid yellow;
  border-left: 50px solid green;
}

.bottom-fan {
  position: absolute;
  bottom: 0;
  right: 0;
  border-top: 50px solid cyan;
  border-right: 50px solid transparent;
  border-bottom: 50px solid blue;
  border-left: 50px solid blue;
}

.left-fan {
  position: absolute;
  bottom: 0;
  left: 0;
  border-top: 50px solid purple;
  border-right: 50px solid yellowgreen;
  border-bottom: 50px solid transparent;
  border-left: 50px solid purple;
}

.stick {
  position: absolute;
  left: 92px;
  bottom: 0;
  width: 16px;
  height: 300px;
  background-color: olive;
  border-radius: 25px;
  z-index: -1;
}

.fastened {
  position: absolute;
  left: 90px;
  top: 90px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: gray;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}
</style>
